<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<style type="text/css">
	    #outer {
	    	width:40%;
	    }
	    #locales {
	    	width:30%;
	    	float:right;
	    	font-family:arial;
	    	font-size:15px;
	    }
	    #levels {
	    	float:left;
	    	width:30%;
	    	font-family:arial;
	    	font-size:18px;
	    }
    </style>
	<script type="text/javascript">
		function submitForm(level){
			document.getElementById("lvl").value = level; 
			document.getElementById("levelForm").submit();
		}
	</script>
	</head>
	<body>
		<c:import url="header.jsp" ></c:import>
		<div id="outer">
			<div id="locales" align="right">
				<form name="levelForm" id="levelForm" method="post" action="/level.htm">
				<div>
					Language:
					<select name="loc">
						<c:forEach var="language" items="${languages}">
	      					<option value="<c:out value="${language}"/>"><c:out value="${language}"/></option>
	    				</c:forEach>
					</select>
				</div>
				<input type="hidden" id="lvl" name="lvl"/>
				</form>			
			</div>
			<div id="levels" align="center">
				<c:forEach var="i" begin="1" end="${levelsNumber}">
	      			<a href="#" onclick="submitForm('<c:out value="${i}"/>')">Level <c:out value="${i}"/><br/></a>
	    		</c:forEach>
			</div>
		</div>
	</body>
</html>